<?php /* Smarty version 2.6.26, created on 2010-12-14 10:36:27
         compiled from admin/task.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'sslash', 'admin/task.html', 24, false),array('modifier', 'date_format', 'admin/task.html', 34, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru"> 
    <head>
	<title>LocalCRM</title>
	<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
	<script src="js/jquery-ui-1.8.4.custom.min.js" type="text/javascript"></script>
	<script src="js/jquery.blockUI.js" type="text/javascript"></script>
	<script src="js/jquery.contextMenu.js" type="text/javascript"></script>
	<script src="js/crm/common.js" type="text/javascript"></script>
	<link href="css/redmond/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css"/>
	<link href="css/jquery.contextMenu.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
	<a href="javascript:history.back()" class="button">&laquo;&nbsp;Назад</a>
	<table align="center" width="70%" cellspacing="0" class="ui-widget ui-state-default ui-corner-top">
	    <thead class="ui-widget-header">
		<tr><th colspan="4">Задача</th></tr>
	    </thead>
	    <tbody class="ui-widget-content">
		<tr>
		    <td align="right"><strong>Номер задачи:</strong></td>
		    <td><?php echo $this->_tpl_vars['task']['id']; ?>
</td>
		    <td align="right"><strong>Клиент:</strong></td>
		    <td><a href="customer-view.php?id=<?php echo $this->_tpl_vars['task']['customer_id']; ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['task']['customer_name'])) ? $this->_run_mod_handler('sslash', true, $_tmp) : stripslashes($_tmp)); ?>
</a></td>
		</tr>
		<tr>
		    <td align="right"><strong>Постановщик:</strong></td>
		    <td><?php echo $this->_tpl_vars['task']['c_manager']; ?>
</td>
		    <td align="right"><strong>Исполнитель:</strong></td>
		    <td><?php echo $this->_tpl_vars['task']['r_manager']; ?>
</td>
		</tr>
		<tr>
		    <td align="right"><strong>Дата постановки:</strong></td>
		    <td><?php if ($this->_tpl_vars['task']['date_time'] > 0): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['task']['date_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%d.%m.%Y, %H:%M') : smarty_modifier_date_format($_tmp, '%d.%m.%Y, %H:%M')); ?>
<?php else: ?>&mdash;<?php endif; ?></td>
		    <td align="right"><strong>Дата начала:</strong></td>
		    <td><?php if ($this->_tpl_vars['task']['task_time'] > 0): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['task']['task_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%d.%m.%Y, %H:%M') : smarty_modifier_date_format($_tmp, '%d.%m.%Y, %H:%M')); ?>
<?php else: ?>&mdash;<?php endif; ?></td>
		</tr>
		<tr>
		    <td align="right"><strong>Суть задачи:</strong></td>
		    <td colspan="3"><?php echo $this->_tpl_vars['task']['note']; ?>
</td>
		</tr>
	    </tbody>
	    <?php if ($this->_tpl_vars['task']['close'] == '1'): ?>
	    <tbody>
		<tr><td colspan="4" align="center"><strong>Задача закрыта</strong></td></tr>
	    </tbody>
	    <?php endif; ?>
	</table>
	<hr/><br/>
	<table align="center" width="70%" cellspacing="0" class="ui-widget ui-state-default ui-corner-top">
	    <thead class="ui-widget-header">
		<tr><th colspan="3">История</th></tr>
	    </thead>
	    <tbody class="ui-widget-content">
	    <?php $_from = $this->_tpl_vars['comments']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['comments'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['comments']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['comment']):
        $this->_foreach['comments']['iteration']++;
?>
		<tr <?php if (!(1 & $this->_foreach['comments']['iteration'])): ?>bgcolor="#f0f0ff"<?php endif; ?>>
		    <td align="center" width="20%"><?php echo ((is_array($_tmp=$this->_tpl_vars['comment']['comment_date'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%d.%m.%Y, %H:%M') : smarty_modifier_date_format($_tmp, '%d.%m.%Y, %H:%M')); ?>
</td>
		    <td><?php echo $this->_tpl_vars['comment']['manager_name']; ?>
</td>
		    <td><?php echo $this->_tpl_vars['comment']['comment']; ?>
</td>
		</tr>
	    <?php endforeach; else: ?>
		<tr><td colspan="4" align="center"><i>нет записей</i></td></tr>
	    <?php endif; unset($_from); ?>
	    </tbody
	</table
    </body>
</html>